package com.agan.jvm.test07.lesson05;


/**
 * @author 阿甘
 * @see https://study.163.com/course/introduction/1211562809.htm?share=1&shareId=1028852228
 * @version 1.0
 * 注：如有任何疑问,欢迎加阿甘老师微信agan-java 进行讨论
 */
public class GcTest01 {
    private static final int _1MB = 1024* 1024;

    /**
     -Xms30M
     -Xmx30M
     -XX:+PrintGCDetails
     -XX:+PrintHeapAtGC
     */
    public static void main(String[] args) throws InterruptedException {

        byte[] allocation1 = new byte[2*_1MB];
        System.out.println("--------创建2M后--------");
        byte[] allocation2 = new byte[2*_1MB];
        System.out.println("--------创建2M后--------");
        byte[] allocation3 = new byte[4*_1MB];
        System.out.println("--------创建4M后--------");

    }

}
